home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / libnix.lha / gnu / lib / libnix / sources.lha / headers / stabs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-16  |  1.0 KB  |  30 lines

  1. #ifndef _STABS_H_
  2. #define _STABS_H_
  3.  
  4. /* These are some macros for handling of symboltable information
  5.  */
  6.  
  7. /* linker can use symbol b for symbol a if a is not defined */
  8. #define ALIAS(a,b) asm(".stabs \"_" #a "\",11,0,0,0\n.stabs \"_" #b "\",1,0,0,0")
  9.  
  10. /* add symbol a to list b (type c (22=text 24=data 26=bss)) */
  11. #define ADD2LIST(a,b,c) asm(".stabs \"_" #b "\"," #c ",0,0,_" #a )
  12.  
  13. /* Install private constructors and destructors pri MUST be -127<=pri<=127 */
  14. #define ADD2INIT(a,pri) ADD2LIST(a,__INIT_LIST__,22); \
  15.                         asm(".stabs \"___INIT_LIST__\",20,0,0," #pri "+128")
  16. #define ADD2EXIT(a,pri) ADD2LIST(a,__EXIT_LIST__,22); \
  17.                         asm(".stabs \"___EXIT_LIST__\",20,0,0," #pri "+128")
  18.  
  19. /* Add to library list */
  20. #define ADD2LIB(a) ADD2LIST(a,__LIB_LIST__,24)
  21.  
  22. /* This one does not really handle symbol tables
  23.  * it's just pointless to write a header file for one macro
  24.  *
  25.  * define a as a label for an absolute address b
  26.  */
  27. #define ABSDEF(a,b) asm("_" #a "=" #b ";.globl _" #a )
  28.  
  29. #endif
  30.